;(function() {
	   	$("#form-submit").click(function(){
			if(is_auto_read()){
					return false;
			}
	   		var csharp=window.external;
			var num=csharp.ReadAuth();	
			if(num<'0'){//读卡错误(读取权限)
				toastr['error'](csharp.GetError(num)+","+num);
				return false;
			}else{
				$("#pvalue").val(num);
			}
	   			$.post(
	   				"/admin/SlidingGroup/query",
	   				$("#validate-form").serialize(),
	   				function(data){
			      		if(data.flag){
			      			data=data.data;
			      			$("#pname").val(data.pname);
			      			$("#pdesc").val(data.pdesc);
			      			$("#detail").text(data.detail);
			      			toastr['success']("操作成功！", ''); 
			      		}else{
			      		 	toastr['error'](data.msg,"操作失败！"); 
			      		}
	   				}
	   			);
	   		
	   	})
})();